<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Module psql_pool</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body bgcolor="white">

<h1>Module psql_pool</h1>

<ul><li><a href="#index">Function Index</a></li><li><a href="#functions">Function Details</a></li></ul>
<p><b>Behaviours:</b> <a href="gen_server.html"><tt>gen_server</tt></a>.</p>
<p><b>Authors:</b> Martin Carlson (<a href="mailto:martin@erlang-consulting.com"><tt>martin@erlang-consulting.com</tt></a>).</p>

<h2><a name="index">Function Index</a></h2>
<table width="100%" border="1"><tr><td valign="top"><a href="#alloc-1">alloc/1</a></td><td>Allocates a resource.</td></tr>
<tr><td valign="top"><a href="#code_change-3">code_change/3</a></td><td/></tr>
<tr><td valign="top"><a href="#free-1">free/1</a></td><td>Frees a pid.</td></tr>
<tr><td valign="top"><a href="#handle_call-3">handle_call/3</a></td><td/></tr>
<tr><td valign="top"><a href="#handle_cast-2">handle_cast/2</a></td><td/></tr>
<tr><td valign="top"><a href="#handle_info-2">handle_info/2</a></td><td/></tr>
<tr><td valign="top"><a href="#init-1">init/1</a></td><td/></tr>
<tr><td valign="top"><a href="#ref-1">ref/1</a></td><td>Get the resource bound to pid.</td></tr>
<tr><td valign="top"><a href="#register-1">register/1</a></td><td>Register a resource.</td></tr>
<tr><td valign="top"><a href="#start_link-0">start_link/0</a></td><td/></tr>
<tr><td valign="top"><a href="#terminate-2">terminate/2</a></td><td/></tr>
<tr><td valign="top"><a href="#unregister-1">unregister/1</a></td><td>Unregisters a resource.</td></tr>
</table>

<h2><a name="functions">Function Details</a></h2>

<h3><a name="alloc-1">alloc/1</a></h3>
<p><tt>alloc(Pid::pid()) -&gt; pid()</tt></p>
<p>Allocates a resource</p>

<h3><a name="code_change-3">code_change/3</a></h3>
<tt>code_change(OldVsn, State, Extra) -&gt; term()
</tt>

<h3><a name="free-1">free/1</a></h3>
<p><tt>free(Pid::pid()) -&gt; pid()</tt></p>
<p>Frees a pid</p>

<h3><a name="handle_call-3">handle_call/3</a></h3>
<tt>handle_call(X1, From, State) -&gt; term()
</tt>

<h3><a name="handle_cast-2">handle_cast/2</a></h3>
<tt>handle_cast(Msg, State) -&gt; term()
</tt>

<h3><a name="handle_info-2">handle_info/2</a></h3>
<tt>handle_info(X1, State) -&gt; term()
</tt>

<h3><a name="init-1">init/1</a></h3>
<tt>init(X1) -&gt; term()
</tt>

<h3><a name="ref-1">ref/1</a></h3>
<p><tt>ref(Pid) -&gt; pid() | nomatch</tt></p>
<p>Get the resource bound to pid</p>

<h3><a name="register-1">register/1</a></h3>
<p><tt>register(Resource::pid()) -&gt; ok</tt></p>
<p>Register a resource</p>

<h3><a name="start_link-0">start_link/0</a></h3>
<tt>start_link() -&gt; term()
</tt>

<h3><a name="terminate-2">terminate/2</a></h3>
<tt>terminate(Reason, State) -&gt; term()
</tt>

<h3><a name="unregister-1">unregister/1</a></h3>
<p><tt>unregister(Resource::pid()) -&gt; ok</tt></p>
<p>Unregisters a resource</p>
</body>
</html>
